<?php

use Biz\service\BrandRights\BrandLevelRightsService;

class LevelUpgradeAlertAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_REGISTER;

    public function main()
    {
        $returnData = [
            'count' => 0,
            'list' => [],
        ];

        $aResult = BrandLevelRightsService::getBrandUpgradeLevelRightsAlert($this->uid);

        if ($aResult) {
            $returnData['count'] = count($aResult);
            $returnData['list'] = $aResult;
        }

        $this->setSuccess($returnData);
    }
}